package com.zx.common;

public enum ResponseCode {
    SUCCESS(0,"SUCCESS"),
    ERROR(1,"ERROR"),
    LOGIN_FAIL(2,"账号或密码错误！"),
    NEED_SIGNUP(3,"用户名不存在，请先注册！"),
    ROLE_ERROR(4,"您不是管理员，请使用用户登录！"),
    LOGOUT_SUCCESS(5,"成功退出登录！"),
    SIGNUP_SUCCESS(6,"注册成功！"),
    USER_EXISTS(7,"用户名已存在！"),
    SAVE_SUCCESS(8,"保存成功！"),
    EDIT_SUCCESS(9,"修改成功！"),
    DELETE_SUCCESS(10,"删除成功！"),
    Category_EXISTS(11,"类别已存在！"),
    ADD_SUCCESS(12,"添加成功"),
    LOGIN_ERROR(13,"权限认证失败，请先登录！"),
    NEED_LOGIN(14,"请先登录，再进行操作！"),
    COLLECT_EXISTS(15,"已收藏过了！"),
    COMMENT_SUCCESS(16,"评论成功！")
    ;

    private final int code;
    private final String desc;

    ResponseCode(int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode(){
        return code;
    }
    public String getDesc(){
        return desc;
    }
}
